package com.tedu.bill;

/**
 * Author：毕龙
 * Date: 2024/3/14 20:27
 * 本类测试整数的默认类型
 */
public class TestInt {
    public static void main(String[] args) {
        //声明一个int类型
        int i1 = 213;
        System.out.println(i1);
        //数据.var
        int i2 = 2147483647;
        System.out.println(i2);
        // 整数的默认类型是int  最大值就是2147483647
        //Integer number too large
        //int i3 = 2147483648;
        int i4 = 2147483647 + 1 ;
        System.out.println(i4);

        byte b1 = 1;
        int i5 = b1 + b1;
        byte b2 = 1 + 1;

        int i6 = 2;
        int i7 = 2147483647 + i6;
        System.out.println(i7);

        System.out.println("int最大值：" + Integer.MAX_VALUE);
        System.out.println("int最小值：" + Integer.MIN_VALUE);

    }
}
